﻿using System;
using System.Collections.Generic;
using InterfaceLiftLib.Converters.Json;
using Newtonsoft.Json;

namespace InterfaceLiftLib.Models
{
    public class Wallpaper
    {
        [JsonProperty("id")]
        public int Id { get; protected set; }

        [JsonProperty("user_id")]
        public int UserId { get; protected set; }

        [JsonProperty("user_name")]
        public string UserName { get; protected set; }

        [JsonProperty("user_url_ifl")]
        public string UserPanelUrl { get; protected set; }

        [JsonProperty("user_wallpaper_count")]
        public int UserWallpapersCount { get; protected set; }

        [JsonProperty("title")]
        public string Title { get; protected set; }

        [JsonProperty("description")]
        public string Description { get; protected set; }

        [JsonProperty("date_featured_timestamp")]
        [JsonConverter(typeof(UnixTimestampToDateTimeConverter))]
        public DateTime DateFeatured { get; protected set; }

        [JsonProperty("favorites_count")]
        public int FavoritesCount { get; protected set; }

        [JsonProperty("comments_count")]
        public int CommentsCount { get; protected set; }

        [JsonProperty("url_ifl")]
        public string WallpaperDetailsUrl { get; protected set; }

        [JsonProperty("url_ifl_short")]
        public string WallpaperDetailsShortUrl { get; protected set; }

        [JsonProperty("latitude")]
        public double Latitude { get; protected set; }

        [JsonProperty("longitude")]
        public double Longitude { get; protected set; }

        [JsonProperty("camera_id")]
        public int CameraId { get; protected set; }

        [JsonProperty("camera_brand")]
        public string CameraBrand { get; protected set; }

        [JsonProperty("camera_model")]
        public string CameraModel { get; protected set; }

        [JsonProperty("lens_id")]
        public int LensId { get; protected set; }

        [JsonProperty("lens_brand")]
        public string LensBrand { get; protected set; }

        [JsonProperty("lens_model")]
        public string LensModel { get; protected set; }

        [JsonProperty("exposure_focal_length")]
        public double ExposureFocalLength { get; protected set; }

        [JsonProperty("exposure_aperture")]
        public double ExposureAperture { get; protected set; }

        [JsonProperty("exposure_shutter_speed")]
        public double ExposureShutterSpeed { get; protected set; }

        [JsonProperty("exposure_iso")]
        public double ExposureIso { get; protected set; }

        [JsonProperty("resolutions_available_array")]
        [JsonConverter(typeof(ResolutionConverter))]
        public IEnumerable<Resolution> ResolutionsAvailable { get; protected set; }

        [JsonProperty("tag_id_array")]
        public IEnumerable<int> TagIds { get; protected set; }

        [JsonProperty("preview_width")]
        public int PreviewWidth { get; protected set; }

        [JsonProperty("preview_height")]
        public int PreviewHeight { get; protected set; }

        [JsonProperty("preview_size_in_bytes")]
        public int PreviewSizeInBytes { get; protected set; }

        [JsonProperty("preview_url")]
        public string PreviewUrl { get; protected set; }

        [JsonProperty("preview_width@2x")]
        public int RetinaPreviewWidth { get; protected set; }

        [JsonProperty("preview_height@2x")]
        public int RetinaPreviewHeight { get; protected set; }

        [JsonProperty("preview_size_in_bytes@2x")]
        public int RetinaPreviewSizeInBytes { get; protected set; }

        [JsonProperty("preview_url@2x")]
        public string RetinaPreviewUrl { get; protected set; }
    }
}
